Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fill the RequestBody description with the first parameter of a… #3076

Conversation

jgarciadelanoceda
Copy link
Contributor

@jgarciadelanoceda jgarciadelanoceda commented Sep 22, 2024

Fixes #3038 and #2062.
Better to document each member of a FromForm independently and do it only on the properties.
The original commit that deleted the possibility of documenting a parameter of a FromForm request was this one:c1fb18c.

As you see in the SchemaFilter it deleted the posibility of documenting a Parameter of a FromForm request. My first try was just to look for it again, but it generated duplicated nodes description. For a parameter it ended up documenting the parameter itself and the Schema.. So I opted to just document the Parameter in the RequestBodyFilter (For C# parameters, because the properties were already set)

… FromForm request, and document the Properties instead
@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@8b0e896). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...gerGen/XmlComments/XmlCommentsRequestBodyFilter.cs 87.50% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #3076   +/-   ##
=========================================
  Coverage          ?   90.50%           
=========================================
  Files             ?       76           
  Lines             ?     3118           
  Branches          ?      515           
=========================================
  Hits              ?     2822           
  Misses            ?      296           
  Partials          ?        0           
Flag Coverage Δ
Linux 90.50% <87.50%> (?)
Windows 90.50% <87.50%> (?)
macOS 90.50% <87.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgarciadelanoceda
Copy link
Contributor Author

jgarciadelanoceda commented Sep 22, 2024

Another possibility for fixing this issue is to pass the Binding info and apply in the SchemaFilter the change only when the object is a Parameter and also when is FromForm(which is a change in the PublicApi) 🥲 so I didn't opt for this

@martincostello martincostello added this to the v6.8.0 milestone Sep 23, 2024
@martincostello martincostello enabled auto-merge (squash) September 23, 2024 09:19
@martincostello martincostello merged commit c3fd84b into domaindrivendev:master Sep 23, 2024
9 checks passed
@jgarciadelanoceda jgarciadelanoceda deleted the issue_3038_AllowDocumentingFromFormParameters branch September 23, 2024 09:28
@martincostello
Copy link
Collaborator

@jgarciadelanoceda In the issue descriptions can you use the syntax fixes #N so that the auto-close works please? fixes the issue #n doesn't work 😃

renovate bot referenced this pull request in orso-co/Orso.Arpa.Api Sep 27, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Swashbuckle.AspNetCore](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore)
| `6.7.3` -> `6.8.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Swashbuckle.AspNetCore/6.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Swashbuckle.AspNetCore/6.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Swashbuckle.AspNetCore/6.7.3/6.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Swashbuckle.AspNetCore/6.7.3/6.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>domaindrivendev/Swashbuckle.AspNetCore
(Swashbuckle.AspNetCore)</summary>

###
[`v6.8.0`](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/releases/tag/v6.8.0)

##### What's Changed

- Added dependency injection/easy registration for async filters by
[@&#8203;tofi92](https://redirect.github.com/tofi92) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3030](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3030)
- Improve IncludeXmlComments performance (2) by
[@&#8203;mus65](https://redirect.github.com/mus65) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3044](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3044)
- Apply ParameterFilters and RequestBodyFilters for WithOpenApi
endpoints by
[@&#8203;jgarciadelanoceda](https://redirect.github.com/jgarciadelanoceda)
in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3059](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3059)
- Swagger plugins support by
[@&#8203;jvmlet](https://redirect.github.com/jvmlet) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3056](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3056)
- Add benchmarks project by
[@&#8203;martincostello](https://redirect.github.com/martincostello) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3050](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3050)
- Fix NuGet badge by
[@&#8203;martincostello](https://redirect.github.com/martincostello) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3064](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3064)
- SwaggerGen - Improved handling of dictionaries with enum key by
[@&#8203;flarestudiopl](https://redirect.github.com/flarestudiopl) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3068](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3068)
- Fix typo by
[@&#8203;tom-star119](https://redirect.github.com/tom-star119) in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3073](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3073)
- Do not fill the RequestBody description with the first parameter of a…
by
[@&#8203;jgarciadelanoceda](https://redirect.github.com/jgarciadelanoceda)
in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3076](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3076)

##### New Contributors

- [@&#8203;tofi92](https://redirect.github.com/tofi92) made their first
contribution in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3030](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3030)
- [@&#8203;mus65](https://redirect.github.com/mus65) made their first
contribution in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3044](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3044)
- [@&#8203;jvmlet](https://redirect.github.com/jvmlet) made their first
contribution in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3056](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3056)
- [@&#8203;flarestudiopl](https://redirect.github.com/flarestudiopl)
made their first contribution in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3068](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3068)
- [@&#8203;tom-star119](https://redirect.github.com/tom-star119) made
their first contribution in
[https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3073](https://redirect.github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/3073)

**Full Changelog**:
domaindrivendev/Swashbuckle.AspNetCore@v6.7.3...v6.8.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm every weekday,every
weekend,before 5am every weekday" in timezone Europe/Berlin, Automerge -
At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/orso-co/Orso.Arpa.Api).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants